#include "zen_game_object.h"

namespace Zen
{
	namespace Game
	{
		int Object::sTotalObjectCount = 0;
#if VAP_OBJECT_DEBUG
		std::set<Object*> Object::sAll;
#endif
	} // namespace Game
	void Game::RenderStack::PushMatrix(Mat4 const* matrix, int version)
	{
		mMatrixStack.emplace_back(matrix, version);
	}
	void Game::RenderStack::PopMatrix()
	{
		mMatrixStack.pop_back();
	}
	Mat4 const* Game::RenderStack::GetTopMatrix()
	{
		return (mMatrixStack.size() ? mMatrixStack.back().first : nullptr);
	}
	int Game::RenderStack::GetTopMatrixVersion()
	{
		return (mMatrixStack.size() ? mMatrixStack.back().second : -1);
	}
	void Game::RenderStack::Reset()
	{
		mMatrixStack.clear();
	}
} // namespace Zen
